<template>
  <div class="relation-polar">
    <div id="relations-map" style="height: 800px;"></div>
  </div>
</template>

<script>
import setRelationMap from './RelationPolar.js';

export default {
  name: "RelationMap",
  props: {
    name: String,
    level: {
      type: Number,
      default: 2
    }
  },
  data() {
    return {

    };
  },
  computed: {
    id() {
      return this.$route.params.id;
    }
  },
  mounted() {
    const id = this.id
    const myChart = setRelationMap(this.name, id, this.level, this.$router);

  },
  watch: {
    'level' (name) {
      if (this.name != 'Loading') {
        setRelationMap(this.name, this.id, this.level);
      }
    }
  },
  methods: {

  },
  components: {

  },
};
</script>

<style scoped lang="scss">
.relation-polar {
  >#relations-map {

  }
}
</style>
